<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-04 16:53:56
 * @LastEditTime: 2022-08-23 19:43:29
 * @LastEditors: CHINAKAIYUAN
 * @Description: 
 */

namespace App\Http\Services\System;


use App\Http\Services\Service;
use App\Repositories\AutoCodeRepository;

class AutoCodeService extends Service
{
    public function __construct(AutoCodeRepository $repository)
    {
        $this->repository = $repository;
    }

    public function list()
    {
        $data = $this->repository->condition(request())->getGrid();
        return $data;
    }

    protected function save($request)
    {
        return $this->repository->autosave($request->toArray());
    }
    protected function delete($request)
    {
        return $this->repository->delete($this->getRequestIds());
    }
}
